package top.korori.entity.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 
 * 后台菜单表
 * 
 *
 * @author korori
 * @since
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel(value = "SysMenu树状数据")
public class SysMenuVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("菜单id")
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Long menuId;

    @ApiModelProperty("菜单名")
    private String title;

    @ApiModelProperty("菜单图标")
    private String icon;

    @ApiModelProperty("父id")
    private Long pid;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("跳转路径")
    private String path;

    @ApiModelProperty("组件路径")
    private String component;

    @ApiModelProperty("路由参数")
    private String query;

    @ApiModelProperty("菜单类型(0 目录,1 菜单, 2按钮)")
    private Integer type;

    @ApiModelProperty("状态(0 正常 1 停用)")
    private Integer status;

    @ApiModelProperty("权限字符")
    private String perms;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("子节点")
    private List<SysMenuVo> children;


}
